import 'package:flutter/material.dart';


class ProgressPage extends StatefulWidget {
  const ProgressPage({Key? key}) : super(key: key);

  @override
  State<ProgressPage> createState() => _ProgressPageState();
}

class _ProgressPageState extends State<ProgressPage> {
  @override
  Widget build(BuildContext context) {
    double width = MediaQuery.of(context).size.width;
    return Scaffold(
      appBar: AppBar(
        title: Text("进度条使用"),
      ),
      body: SingleChildScrollView(
        child: Column(
          children: [
            Text("圆形"),
            Container(
              width: width,
              height: 300,
              alignment: Alignment.center,
              color: Colors.grey,
              child: SizedBox(
                width: 44,
                height: 44,
                child: CircularProgressIndicator(
                  // 背景色
                  backgroundColor: Colors.white,
                  // 前景色
                  valueColor:AlwaysStoppedAnimation(Colors.red)
                )
                ),
            ),
            Text("条形"),
            Container(
              width: width,
              height: 300,
              alignment: Alignment.center,
              color: Colors.grey,
              child: LinearProgressIndicator(),
            )
          ],
        ),
      ),

    );
    
  }
}